<?php
namespace User\Model;

use Zend\Form\Annotation;

class User
{
    public $id;
    public $username;
    public $password;
    public $real_name;
    public $gender;
    public $user_type;
    public $email;
    public $phone_number;
    public $address;
    public $note;
    public $rememberme;
    public $submit;
    /**
     * Used by ResultSet to pass each database row to the entity
     */
    public function exchangeArray($data)
    {
        $this->id     = (isset($data['id'])) ? $data['id'] : null;
        $this->username = (isset($data['username'])) ? $data['username'] : null;
        $this->password  = (isset($data['password'])) ? $data['password'] : null;
        $this->real_name  = (isset($data['real_name'])) ? $data['real_name'] : null;
        $this->gender  = (isset($data['gender'])) ? $data['gender'] : null;
        $this->user_type  = (isset($data['user_type'])) ? $data['user_type'] : null;
        $this->email  = (isset($data['email'])) ? $data['email'] : null;
        $this->phone_number  = (isset($data['phone_number'])) ? $data['phone_number'] : null;
        $this->address  = (isset($data['address'])) ? $data['address'] : null;
        $this->note  = (isset($data['note'])) ? $data['note'] : null;
    }
}